// vite.config.js
import { defineConfig, loadEnv } from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/vite/dist/node/index.js";
import vue from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import AutoImport from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/unplugin-auto-import/dist/vite.js";
import Components from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/unplugin-vue-components/dist/vite.mjs";
import {
  ElementPlusResolver
} from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/unplugin-vue-components/dist/resolvers.mjs";
import path from "path";
import legacy from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/@vitejs/plugin-legacy/dist/index.mjs";
import viteCompression from "file:///Users/sorrow/Desktop/%E6%B8%A9%E5%B7%9E%E4%BF%9D%E7%A8%8E%E5%95%86%E5%9F%8E/a-bonded-zone-shop/node_modules/vite-plugin-compression/dist/index.mjs";
var __vite_injected_original_dirname = "/Users/sorrow/Desktop/\u6E29\u5DDE\u4FDD\u7A0E\u5546\u57CE/a-bonded-zone-shop";
var vite_config_default = defineConfig(({ mode }) => {
  const config = loadEnv(mode, "./");
  return {
    base: process.env.NODE_ENV === "production" ? "./" : "/",
    server: {
      proxy: {
        "/api": {
          target: config.VITE_BASIC_URL,
          changeOrigin: true,
          rewrite: (path2) => path2.replace(/^\/api/, "")
        }
      },
      host: "0.0.0.0",
      // 可通过任何网络接口访问
      port: 5252
      // 修改为你想要的端口号
    },
    plugins: [
      viteCompression({
        verbose: true,
        disable: false,
        threshold: 10240,
        algorithm: "gzip",
        ext: ".gz"
      }),
      vue(),
      legacy({
        targets: ["ie>=11"],
        additionalLegacyPolyfills: ["regenerator-runtime/runtime"]
      }),
      AutoImport({
        resolvers: [ElementPlusResolver()]
      }),
      Components({
        resolvers: [ElementPlusResolver()]
      })
    ],
    css: {
      preprocessorOptions: {
        // 全局样式引入
        scss: {
          additionalData: '@import "./static/scss/element.scss";@import "./static/scss/main.scss";',
          javascriptEnabled: true
        }
      }
    },
    resolve: {
      alias: {
        "@": path.join(__vite_injected_original_dirname, "./src")
      }
    },
    build: {
      assetsDir: "static",
      minify: "terser",
      productionSouceMap: false,
      assetsPublicPath: "/shop/",
      rollupOptions: {
        output: {
          chunkFileNames: "static/js/[name]-[hash].js",
          entryFileNames: "static/js/[name]-[hash].js",
          assetFileNames: "static/[ext]/[name]-[hash].[ext]",
          manualChunks(id) {
            if (id.includes("node_modules")) {
              return id.toString().split("node_modules/")[1].split("/")[0].toString();
            }
          }
        }
      },
      terserOptions: {
        compress: {
          drop_console: true,
          drop_debugger: true
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcuanMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCIvVXNlcnMvc29ycm93L0Rlc2t0b3AvXHU2RTI5XHU1RERFXHU0RkREXHU3QTBFXHU1NTQ2XHU1N0NFL2EtYm9uZGVkLXpvbmUtc2hvcFwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiL1VzZXJzL3NvcnJvdy9E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